/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multiface.promonet.jpa;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author diego
 */
@Entity
@Table(name = "logdb")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Logdb.findAll", query = "SELECT l FROM Logdb l"),
    @NamedQuery(name = "Logdb.findByIdlogdb", query = "SELECT l FROM Logdb l WHERE l.idlogdb = :idlogdb"),
    @NamedQuery(name = "Logdb.findByDataora", query = "SELECT l FROM Logdb l WHERE l.dataora = :dataora"),
    @NamedQuery(name = "Logdb.findByUserinfo", query = "SELECT l FROM Logdb l WHERE l.userinfo = :userinfo"),
    @NamedQuery(name = "Logdb.findBySessionid", query = "SELECT l FROM Logdb l WHERE l.sessionid = :sessionid"),
    @NamedQuery(name = "Logdb.findByUserAgent", query = "SELECT l FROM Logdb l WHERE l.userAgent = :userAgent"),
    @NamedQuery(name = "Logdb.findByAction", query = "SELECT l FROM Logdb l WHERE l.action = :action")})
public class Logdb implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idlogdb")
    private Long idlogdb;
    @Basic(optional = false)
    @Column(name = "dataora")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dataora;
    @Column(name = "userinfo")
    private String userinfo;
    @Column(name = "sessionid")
    private String sessionid;
    @Column(name = "user_agent")
    private String userAgent;
    @Lob
    @Column(name = "parametri")
    private String parametri;
    @Column(name = "action")
    private String action;
    @Basic(optional = false)
    @Lob
    @Column(name = "commento")
    private String commento;

    public Logdb() {
    }

    public Logdb(Long idlogdb) {
        this.idlogdb = idlogdb;
    }

    public Logdb(Long idlogdb, Date dataora, String commento) {
        this.idlogdb = idlogdb;
        this.dataora = dataora;
        this.commento = commento;
    }

    public Long getIdlogdb() {
        return idlogdb;
    }

    public void setIdlogdb(Long idlogdb) {
        this.idlogdb = idlogdb;
    }

    public Date getDataora() {
        return dataora;
    }

    public void setDataora(Date dataora) {
        this.dataora = dataora;
    }

    public String getUserinfo() {
        return userinfo;
    }

    public void setUserinfo(String userinfo) {
        this.userinfo = userinfo;
    }

    public String getSessionid() {
        return sessionid;
    }

    public void setSessionid(String sessionid) {
        this.sessionid = sessionid;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getParametri() {
        return parametri;
    }

    public void setParametri(String parametri) {
        this.parametri = parametri;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getCommento() {
        return commento;
    }

    public void setCommento(String commento) {
        this.commento = commento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idlogdb != null ? idlogdb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Logdb)) {
            return false;
        }
        Logdb other = (Logdb) object;
        if ((this.idlogdb == null && other.idlogdb != null) || (this.idlogdb != null && !this.idlogdb.equals(other.idlogdb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "multiface.promonet.jpa.Logdb[ idlogdb=" + idlogdb + " ]";
    }
    
}
